.TH "Slurm API" "3" "Slurm event trigger management functions" "April 2015" "Slurm event trigger management functions"

.SH "NAME"

slurm_init_trigger_msg, slurm_clear_trigger, slurm_free_trigger_msg, 
slurm_get_triggers, slurm_set_trigger \- Slurm event trigger management functions

.SH "SYNTAX"
.LP
#include <slurm/slurm.h>
.LP
.LP
int \fBslurm_set_trigger\fR (
.br
	trigger_info_t *\fItrigger_info\fP
.br
);
.LP
int \fBslurm_clear_trigger\fR (
.br
	trigger_info_t *\fItrigger_info\fP
.br
);
.LP
int \fBslurm_get_triggers\fR (
.br
	trigger_info_msg_t **\fItrigger_info_msg\fP
.br
);
.LP
int \fBslurm_free_trigger\fR (
.br
	trigger_info_msg_t *\fItrigger_info_msg\fP
.br
);
.LP
int \fBslurm_init_trigger_msg\fR (
.br
	trigger_info_msg_t *\fItrigger_info_msg\fP
.br
);

.SH "ARGUMENTS"
.LP
.TP
\fItrigger_info\fP
Information about one event trigger including trigger ID, type, time offset, etc.
See \fIslurm.h\fP for details.
.TP
\fItrigger_info_msg\fP
A data structure including an array of \fItrigger_info\fP structures 
plus their count.
See \fIslurm.h\fP for details.

.SH "DESCRIPTION"
.LP
\fBslurm_set_trigger\fR Create a new event trigger.
Note that any trigger ID specified in \fItrigger_info\fP is unused.
.LP
\fBslurm_clear_trigger\fR Clear or remove existing event triggers.
If a trigger ID is specified then only that one trigger will be cleared. 
If a job ID or node name is specified, then all triggers associated with 
that resource are cleared. 
.LP
\fBslurm_get_triggers\fR Get information about all currently configured
event triggers. To avoid memory leaks, always follow this with a call
to the \fBslurm_free_trigger\fR function.
.LP
\fBslurm_free_trigger\fR Release the memory allocated for the array 
returned by the \fBslurm_get_triggers\fR function.
.LP
\fBslurm_init_trigger_msg\fR Initialize the data structure to be used in
subsequent call to \fBslurm_set_trigger\fR or \fBslurm_clear_trigger\fR.

.SH "RETURN VALUE"
.LP
\fBSLURM_SUCCESS\fR is returned on successful completion, 
otherwise an error code is returned as described below.

.SH "ERRORS"
.LP
\fBEINVAL\fR Invalid argument
.LP
\fBESLURM_ACCESS_DENIED\fR Attempt by non\-privileged user to set an 
event trigger.
.LP
\fBESLURM_ALREADY_DONE\fR Attempt to set an event trigger for a job which 
has already completed.
.LP
\fBESLURM_INVALID_NODE_NAME\fR Attempt to set an event trigger for a node 
name which is invalid.
.LP
\fBESLURM_INVALID_JOB_ID\fR the specified job id does not exist.
.LP
\fBESLURM_TRIGGER_DUP\fR there is already an identical event trigger.

.SH "NOTE"
These functions are included in the libslurm library,
which must be linked to your process for use
(e.g. "cc \-lslurm myprog.c").

.SH "COPYING"
Copyright (C) 2010 Lawrence Livermore National Security.
Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
Portions Copyright (C) 2014 SchedMD LLC.
.LP
This file is part of Slurm, a resource management program.
For details, see <https://slurm.schedmd.com/>.
.LP
Slurm is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
.LP
Slurm is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
details.
.SH "SEE ALSO"
.LP
\fBstrigger\fR(1),
\fBslurm_get_errno\fR(3), \fBslurm_perror\fR(3), \fBslurm_strerror\fR(3)
